package cate.game.role.mall.refresh.item;

import lombok.Data;

@Data
public abstract class RefreshItem {
    public int times;
    public long lastRefreshTime;

    public void updateRefreshTime(long refreshTime) {
        this.lastRefreshTime = refreshTime;
    }

    public void updateRefreshItem(long refreshTime, int refreshTimesMax){
        updateTimes(refreshTimesMax);
        this.lastRefreshTime = refreshTime;
    }

    public abstract void updateTimes(int refreshTimesMax);

    public void costTimes() {
        times --;
    }

    public void addTimes(int add) {
        times += add;
    }
}
